1. Field of the Invention
This invention is related to software in a computer system (e.g. Basic Input Output System, or BIOS, software) that executes in response to a reset of the computer system.
2. Description of the Related Art
Generally, a computer system may include one or more processors, various integrated circuits, and other devices. When the computer system is powered on, the computer system is reset, thus providing an initial state of the computer system. Then, Basic Input/Output System (BIOS) code is executed to determine the resources of the computer system (e.g. memory, disk drives, keyboard, mouse, etc.), perform various checks on the resources, and enable the resources in the computer system so that operating system software can be loaded from disk and executed. The BIOS code is typically stored in a nonvolatile memory (typically a read only memory (ROM) or a Flash memory), so that the code can be fetched by the processor and executed before most computer system resources are enabled for use.
There may be two types of resets of a processor in a computer system, a “warm reset” and a “cold reset”. Generally, a reset may cause the processor (and other circuits and/or devices that are reset) to establish a known state. A “cold reset” occurs when the computer system is powered on (i.e. when the power supply is turned on and begins supplying voltage to the processor and other circuitry). In a cold reset, all circuitry is reset to a predefined state. On the other hand, a “warm reset” is initiated with the power supply already supplying power to the processor and other circuitry, and after the processor or other circuitry has begun operating (e.g. after the processor has started executing instructions). In a warm reset, at least some of the pre-reset state is retained after the warm reset occurs, while the remaining state is reset to a predefined state. Warm resets may be initiated by hardware, and often may be initiated by software as well (e.g. by writing to a specified register, I/O port, etc.).
The BIOS code may generally be divided into a set of tasks. Each task may perform a defined function (e.g. detect and configure a resource, check for errors in a self-test of the resource, etc.), and generally is intended to run once as a result of a cold reset. However, various tasks may require a warm reset to complete their defined function (e.g. for a configuration to take effect). During development of a computer system (and sometimes after the computer system has been installed in a customer's location), the BIOS code may be modified. Which tasks require a warm reset and which do not require a warm reset may change. Furthermore, it may be desirable to change the order of the tasks.
Typically, a processor may provide an indication of its reset state, permitting software (e.g. BIOS code) to detect whether a warm reset or a cold reset has occurred. The processor may change the indication in different ways in response to a cold reset or a warm reset. The BIOS code may change the indication as well. Particularly, a given task may change the indication to indicate that the task has completed.
Unfortunately, it is difficult for the various tasks to share the processor's indication of reset state. Once one task changes the indication, the indication may not be useful for subsequent executing tasks. In the past, the tasks were forced into a particular order, and only the last task in the order may cause a warm reset.